org.eclipse.vtp.desktop.projects.core
Interface IMediaContainer

All Superinterfaces:
org.eclipse.core.runtime.IAdaptable, IVoiceToolsResource
All Known Subinterfaces:
IMediaFilesFolder, IMediaFolder
All Known Implementing Classes:
MediaFilesFolder, MediaFolder

public interface IMediaContainer
extends IVoiceToolsResource

This interface represents a folder resource that contains media resources such as audio and grammar file resources as well as other folder resources that can contain similar items.

Version:
2.0
Author:
Trip Gilman

Method Summary
 IMediaFile create(java.lang.String name)
          Creates a new media file with the given name.
 IMediaFile create(java.lang.String name, java.io.InputStream source, org.eclipse.core.runtime.IProgressMonitor monitor)
          Creates a new media file with the given name.
 IMediaFile getMediaFile(java.lang.String name)
          Locates the media file with the given name.
 IMediaFolder getMediaFolder(java.lang.String name)
          Locates the media folder with the given name.
 java.util.List listMediaResources()
           
 IMediaFolder makeDirectory(java.lang.String name)
          Creates a new media folder with the given name.
 
Methods inherited from interface org.eclipse.vtp.desktop.projects.core.IVoiceToolsResource
addRefreshListener, deferEvents, getName, getParent, getProject, refresh, removeRefreshListener, resumeEvents
 
Methods inherited from interface org.eclipse.core.runtime.IAdaptable
getAdapter
 

Method Detail

listMediaResources

java.util.List listMediaResources()
                                  throws org.eclipse.core.runtime.CoreException
Returns:
The list of IMediaResources contained by this media folder resource
Throws:
org.eclipse.core.runtime.CoreException - If an error occured while enumerating the media resources

getMediaFolder

IMediaFolder getMediaFolder(java.lang.String name)
Locates the media folder with the given name.

Parameters:
name - The name of the desired media folder
Returns:
The desired media folder or null if not found

getMediaFile

IMediaFile getMediaFile(java.lang.String name)
Locates the media file with the given name.

Parameters:
name - The name of the desired media file
Returns:
The desired media file or null if not found

create

IMediaFile create(java.lang.String name)
                  throws org.eclipse.core.runtime.CoreException
Creates a new media file with the given name. The created file will be initially empty (0 length).

Parameters:
name - The name of the new media file
Returns:
The newly created media file
Throws:
org.eclipse.core.runtime.CoreException - If an error occured while creating the new media file

create

IMediaFile create(java.lang.String name,
                  java.io.InputStream source,
                  org.eclipse.core.runtime.IProgressMonitor monitor)
                  throws org.eclipse.core.runtime.CoreException
Creates a new media file with the given name. It's initial contents will be retrieved from the provided input stream. The progress monitor will be used to provide user feedback during the operation.

Parameters:
name - The name of the new media file
source - The initial contents of the file
monitor - A progress monitor for user feedback
Returns:
The newly created media file
Throws:
org.eclipse.core.runtime.CoreException - If an error occured while creating the new media file

makeDirectory

IMediaFolder makeDirectory(java.lang.String name)
                           throws org.eclipse.core.runtime.CoreException
Creates a new media folder with the given name.

Parameters:
name - The name of the new media folder
Returns:
The newly created media folder
Throws:
org.eclipse.core.runtime.CoreException - If an error occured while creating the media folder